cmake_minimum_required(VERSION 3.14.5)
project(gen8)

set(CMAKE_C_STANDARD 11)
include_directories(gflib)
include_directories(include)
include_directories(include/constants)
include_directories(include/gba)
include_directories(src/data)
include_directories(src/data/bard_music)
include_directories(src/data/battle_frontier)
include_directories(src/data/decoration)
include_directories(src/data/easy_chat)
include_directories(src/data/field_effects)
include_directories(src/data/graphics)
include_directories(src/data/object_events)
include_directories(src/data/pokemon)
include_directories(src/data/pokemon_graphics)
include_directories(src/data/region_map)
include_directories(src/data/text)
include_directories(src/data/trainer_graphics)
include_directories(/usr/include/libpng16)
file(GLOB_RECURSE TOOLS tools/**)
add_definitions(-D_MSC_VER)
add_definitions(-m32)
add_executable(engineUpdated
        gflib/bg.c
        gflib/bg.h
        gflib/blit.c
        gflib/blit.h
        gflib/dma3.h
        gflib/dma3_manager.c
        gflib/gpu_regs.c
        gflib/gpu_regs.h
        gflib/io_reg.c
        gflib/io_reg.h
        gflib/malloc.c
        gflib/malloc.h
        gflib/sprite.c
        gflib/sprite.h
        gflib/string_util.c
        gflib/string_util.h
        gflib/text.c
        gflib/text.h
        gflib/window.c
        gflib/window.h
        src/agb_flash.c
        src/agb_flash_1m.c
        src/agb_flash_le.c
        src/agb_flash_mx.c
        src/AgbRfu_LinkManager.c
        src/apprentice.c
        src/bard_music.c
        src/battle_ai_script_commands.c
        src/battle_ai_switch_items.c
        src/battle_anim.c
        src/battle_anim_bug.c
        src/battle_anim_dark.c
        src/battle_anim_dragon.c
        src/battle_anim_effects_1.c
        src/battle_anim_effects_2.c
        src/battle_anim_effects_3.c
        src/battle_anim_electric.c
        src/battle_anim_fight.c
        src/battle_anim_fire.c
        src/battle_anim_flying.c
        src/battle_anim_ghost.c
        src/battle_anim_ground.c
        src/battle_anim_ice.c
        src/battle_anim_mon_movement.c
        src/battle_anim_mons.c
        src/battle_anim_normal.c
        src/battle_anim_poison.c
        src/battle_anim_psychic.c
        src/battle_anim_rock.c
        src/battle_anim_smokescreen.c
        src/battle_anim_sound_tasks.c
        src/battle_anim_status_effects.c
        src/battle_anim_throw.c
        src/battle_anim_utility_funcs.c
        src/battle_anim_water.c
        src/battle_arena.c
        src/battle_bg.c
        src/battle_controller_link_opponent.c
        src/battle_controller_link_partner.c
        src/battle_controller_opponent.c
        src/battle_controller_player.c
        src/battle_controller_player_partner.c
        src/battle_controller_recorded_opponent.c
        src/battle_controller_recorded_player.c
        src/battle_controller_safari.c
        src/battle_controller_wally.c
        src/battle_controllers.c
        src/battle_dome.c
        src/battle_factory.c
        src/battle_factory_screen.c
        src/battle_gfx_sfx_util.c
        src/battle_interface.c
        src/battle_intro.c
        src/battle_main.c
        src/battle_message.c
        src/battle_palace.c
        src/battle_pike.c
        src/battle_pyramid.c
        src/battle_pyramid_bag.c
        src/battle_records.c
        src/battle_script_commands.c
        src/battle_setup.c
        src/battle_tent.c
        src/battle_tower.c
        src/battle_transition.c
        src/battle_transition_frontier.c
        src/battle_tv.c
        src/battle_util.c
        src/battle_util2.c
        src/berry.c
        src/berry_blender.c
        src/berry_crush.c
#        src/berry_fix_graphics.c
#        src/berry_fix_program.c
        src/berry_powder.c
        src/berry_tag_screen.c
        src/bike.c
        src/birch_pc.c
        src/braille_puzzles.c
        src/cable_car.c
        src/cable_club.c
        src/clear_save_data_screen.c
        src/clock.c
        src/coins.c
        src/confetti_util.c
        src/contest.c
        src/contest_ai.c
        src/contest_effect.c
        src/contest_link.c
        src/contest_link_util.c
        src/contest_painting.c
        src/contest_util.c
        src/coord_event_weather.c
        src/credits.c
        src/data.c
        src/daycare.c
        src/decompress.c
        src/decoration.c
        src/decoration_inventory.c
        src/dewford_trend.c
        src/digit_obj_util.c
        src/diploma.c
        src/dodrio_berry_picking.c
        src/dynamic_placeholder_text_util.c
        src/easy_chat.c
        src/egg_hatch.c
        src/ereader_helpers.c
        src/ereader_screen.c
        src/event_data.c
        src/event_object_lock.c
        src/event_object_movement.c
        src/evolution_graphics.c
        src/evolution_scene.c
        src/faraway_island.c
        src/field_camera.c
        src/field_control_avatar.c
        src/field_door.c
        src/field_effect.c
        src/field_effect_helpers.c
        src/field_message_box.c
        src/field_player_avatar.c
        src/field_poison.c
        src/field_region_map.c
        src/field_screen_effect.c
        src/field_special_scene.c
        src/field_specials.c
        src/field_tasks.c
        src/field_weather.c
        src/field_weather_effect.c
        src/fieldmap.c
        src/fldeff_cut.c
        src/fldeff_dig.c
        src/fldeff_escalator.c
        src/fldeff_flash.c
        src/fldeff_misc.c
        src/fldeff_rocksmash.c
        src/fldeff_softboiled.c
        src/fldeff_strength.c
        src/fldeff_sweetscent.c
        src/fldeff_teleport.c
        src/frontier_pass.c
        src/frontier_util.c
        src/graphics.c
        src/gym_leader_rematch.c
        src/hall_of_fame.c
        src/heal_location.c
        src/hof_pc.c
        src/image_processing_effects.c
        src/international_string_util.c
        src/intro.c
        src/intro_credits_graphics.c
        src/item.c
        src/item_icon.c
        src/item_menu.c
        src/item_menu_icons.c
        src/item_use.c
        src/landmark.c
        src/libisagbprn.c
        src/librfu_intr.c
        src/librfu_rfu.c
        src/librfu_sio32id.c
        src/librfu_stwi.c
        src/lilycove_lady.c
        src/link.c
        src/link_rfu_2.c
        src/link_rfu_3.c
        src/list_menu.c
        src/load_save.c
        src/lottery_corner.c
        src/m4a.c
        src/m4a_tables.c
        src/mail.c
        src/mail_data.c
        src/main.c
        src/main_menu.c
        src/map_name_popup.c
        src/match_call.c
        src/math_util.c
        src/mauville_old_man.c
        src/menu.c
        src/menu_helpers.c
        src/menu_specialized.c
        src/metatile_behavior.c
        src/mevent2.c
        src/mevent_801BAAC.c
        src/mevent_client.c
        src/mevent_news.c
        src/mevent_scripts.c
        src/mevent_server.c
        src/mevent_server_helpers.c
        src/minigame_countdown.c
        src/mirage_tower.c
        src/mon_markings.c
        src/money.c
        src/move_relearner.c
        src/multiboot.c
        src/mystery_event_menu.c
        src/mystery_event_msg.c
        src/mystery_event_script.c
        src/mystery_gift.c
        src/naming_screen.c
        src/new_game.c
        src/option_menu.c
        src/overworld.c
        src/palette.c
        src/palette_util.c
        src/party_menu.c
        src/play_time.c
        src/player_pc.c
        src/pokeball.c
        src/pokeblock.c
        src/pokeblock_feed.c
        src/pokedex.c
        src/pokedex_area_region_map.c
        src/pokedex_area_screen.c
        src/pokedex_cry_screen.c
        src/pokemon.c
        src/pokemon_animation.c
        src/pokemon_icon.c
        src/pokemon_jump.c
        src/pokemon_size_record.c
        src/pokemon_storage_system.c
        src/pokemon_summary_screen.c
        src/pokenav.c
        src/pokenav_conditions_1.c
        src/pokenav_conditions_2.c
        src/pokenav_conditions_3.c
        src/pokenav_main_menu.c
        src/pokenav_match_call_1.c
        src/pokenav_match_call_2.c
        src/pokenav_match_call_data.c
        src/pokenav_match_call_ui.c
        src/pokenav_menu_handler_1.c
        src/pokenav_menu_handler_2.c
        src/pokenav_region_map.c
        src/pokenav_ribbons_1.c
        src/pokenav_ribbons_2.c
        src/post_battle_event_funcs.c
        src/random.c
        src/rayquaza_scene.c
        src/record_mixing.c
        src/recorded_battle.c
        src/region_map.c
        src/reset_rtc_screen.c
        src/reset_save_heap.c
        src/reshow_battle_screen.c
        src/roamer.c
        src/rotating_gate.c
        src/rotating_tile_puzzle.c
        src/roulette.c
        src/rtc.c
        src/safari_zone.c
        src/save.c
        src/save_failed_screen.c
        src/save_location.c
        src/scanline_effect.c
        src/scrcmd.c
        src/script.c
        src/script_menu.c
        src/script_movement.c
        src/script_pokemon_util.c
        src/secret_base.c
        src/shop.c
        src/siirtc.c
        src/slot_machine.c
        src/sound.c
        src/start_menu.c
        src/starter_choose.c
        src/strings.c
        src/task.c
        src/text_input_strings.c
        src/text_window.c
        src/tileset_anims.c
        src/time_events.c
        src/title_screen.c
        src/trade.c
        src/trader.c
        src/trainer_card.c
        src/trainer_hill.c
        src/trainer_pokemon_sprites.c
        src/trainer_see.c
        src/trig.c
        src/tv.c
        src/union_room.c
        src/union_room_battle.c
        src/union_room_chat.c
        src/union_room_player_avatar.c
        src/unk_text_util_2.c
        src/use_pokeblock.c
        src/util.c
        src/walda_phrase.c
        src/wallclock.c
        src/wild_encounter.c
        src/wireless_communication_status_screen.c
        src/battle_anim_new.c
        ${TOOLS} src/battle_evolution.c 
        include/battle_evolution.h 
        src/dynamax.c
        include/dynamax.h
        src/data/battle_frontier/battle_random_mons.h
        src/dexnav.c
        include/dexnav.h
        src/fm.c
        src/day_night.c
        src/legend_battle.c
        include/legend_battle.h include/constants/legend_battle.h
        src/battle_debug.c
        src/debug.c
        include/constants/flags_fr.h
        src/bright_ray.c
        include/bright_ray.h
        src/battle_ai_advanced.c
        src/battle_ai_master.c
        src/battle_ai_negatives.c
        src/battle_ai_util.c
        src/battle_ai_positives.c
        src/battle_ai_partner.c
        src/battle_ai_helper.c
        )
